package com.gouying.design.patterns.fly;

public class FlyMain {

    public static void main(String[] args) {

        WebFactory webFactory = new WebFactory();
        WebSit webSit = webFactory.getWebSit("新闻网");
        User user = new User();
        user.name = "张三";
        webSit.use(user);

        WebSit webSit1 = webFactory.getWebSit("新闻网");
        User user1 = new User();
        user1.name = "里斯";
        webSit.use(user1);

        System.out.println(webSit == webSit1);
    }
}
